const app = getApp();

/**
 * @description: 获取可开票订单列表
 * @return {*}
 */
export const getNotInvoicedOrders = () =>
  app.get(`/order/not_invoiced_orders/`, true);

/**
 * @description: 获取开票历史
 * @return {*}
 */
export const getInvoicedList = () => app.get(`/invoice/invoice_list/`, true);

/**
 * @description: 提交开票信息
 * @return {*}
 */

export const submitInvoice = (data) =>
  app.post(`/invoice/invoice_apply/`, data, true);

/**
 * @description: 发票详情
 * @return {*}
 */
export const getInvoicedDetail = (invoice_id) =>
  app.get(`/invoice/invoice_detail/?invoice_id=${invoice_id}`, true);

/**
 * @description: 重开发票申请
 * @return {*}
 */

export const submitReInvoice = (data) =>
  app.post(`/invoice/re_invoice/`, data, true);
